<div class="root">
    <!--分类tab-->
    <div class="sort-bar-wrapper">
        <div :class="['sort-bar', index == sortTabs.length -1 ? 'sort-bar-last' : '']" v-for="(s,index) in sortTabs" @click="sortClick(s)">
            <image v-if="type == s.type" resize="cover" class="sort-img" :src="positionIcon"></image>
            <text :class="['font-msyhl', type == s.type ? 'sort-txt-active' : 'sort-txt']">{{s.title}}</text>
        </div>
    </div>

    <!--评价列表-->
    <list ref="list" class="list-wrapper" loadmoreoffset="15" @loadmore="fetchMore">
        <cell class="cell-panel" v-for="rate in rateList">
            <div class="rate-wrapper">
                <div class="rate-panel-top">
                    <div class="panel-left">
                        <image resize="cover" class="person-logo" :src="rate.user_img || defaultUserImg"></image>
                        <text class="rate-txt font-msyhl">{{rate.user_nickname}}</text>
                    </div>

                    <div class="panel-right">
                        <image resize="cover" class="rate-logo" :src="type == 1 ? smileFace1 : (type == 2 ? smileFace2 : smileFace0)" ></image>
                        <text class="rate-txt font-msyhl">{{type == 0 ? '好评' : (type == 1 ? '中评' : '差评')}}</text>
                    </div>
                </div>

                <text class="rate-mark font-msyhl">{{rate.rate_info}}</text>
                <text class="rate-time font-msyhl">{{rate.rate_time}}</text>
            </div>
        </cell>

        <!--加载提示-->
        <loading-more-tip v-if="!listCompleted && rateList.length" :loading="loading"></loading-more-tip>

        <cell v-if="listCompleted && rateList.length">
            <loaded-over-tip :tip="'没有更多的数据 ~'"></loaded-over-tip>
        </cell>

        <!--评价为空-->
        <cell class="cell-panel empty-cell" v-if="pageLoaded && !rateList.length">
            <content-empty :emptyTxt="'暂无该评价 ~'"></content-empty>
        </cell>
    </list>
</div>